namespace ClassyBlog.ExtensionMethods.Specs.Unit
{
    using System;

    using Machine.Specifications;

    [Subject(typeof(DateTimExtensions))]
    public class when_trying_to_short_format_date
    {
        static DateTime date;
        static string result;

        Establish context = () => date = new DateTime(2011, 9, 7);

        Because of = () => result = date.ShortFormat();

        It should_properly_format = () => result.ShouldEqual("11-09-07");
    }

    [Subject(typeof(DateTimExtensions))]
    public class when_trying_to_long_format_date
    {
        static DateTime date;
        static string result;

        Establish context = () => date = new DateTime(2011, 9, 7);

        Because of = () => result = date.LongFormat();

        It should_properly_format = () =>
            result.ShouldEqual("September 7, 2011");
    }
}